<!DOCTYPE html>
<html>
<head>
	<title>滚动条距离</title>
</head>
<body>
<div>
	<h1>sdsfs</h1>
	<h1>sdf</h1><br>
	<h1>sdf</h1><br>
	<h1>sdf</h1><br>
	<br><br><br><br><br>
	<br><br><br><br><br>
	<br><br><br><br><br>
	<br><br><br><br><br>
	<br><br><br><br><br>
	<br><br><br><br><br>
	<br><br><br><br><br>
	<br><br><br><br><br>
	<br><br><br><br><br>
	<h1>sdf</h1>
</div>
</body>
<script type="text/javascript">
	
getScroll();


function getScroll() {
	document.onclick = function() {
		console.log(document.body.scrollTop || document.documentElement.scrollTop);
	}
}


</script>
</html>